package com.xy.api.constant;

import java.util.Objects;

public class LadderCostAttributeConstant {

    public static class ZuochuanDistribution {

        //周长
        public static final String PERIMETER = "perimeter";

        //重量
        public static final String WEIGHT = "weight";

        //补贴
        public static final String SUBSIDY = "subsidy";
    }

    public static class AcrossDistribution {
        //周长
        public static final String PERIMETER = "perimeter";

        //重量
        public static final String WEIGHT = "weight";

        //补贴
        public static final String SUBSIDY = "subsidy";
    }

    public static String getName(String key) {
        if (Objects.equals(key, "perimeter")) {
            return "周长";
        } else if (Objects.equals(key, "weight")) {
            return "重量";
        } else if (Objects.equals(key, "subsidy")) {
            return "补贴";
        }
        return "";
    }

    public static String getUnit(String key) {
        String unit = "";
        if (Objects.equals(key, "perimeter")) {
            //周长
            unit = "CM";
        } else if (Objects.equals(key, "weight")) {
            unit = "KG";
        } else if (Objects.equals(key, "subsidy")) {
            unit = "JPY";
        }
        return unit;
    }
}
